import request from '@/utils/request'


// /base-supplier/getBaseSupplierListByProject 调用get  参数projectId
// /bpm/bpmDataList    get 参数 type: 'match' projectId: 项目id

export function getSupplierList(query) { // 项目change事件获取  承建单位 列表
  return request({
    url: `/base-supplier/getBaseSupplierListByProject?projectId=${query}`,
    method: 'get',
    // data: query
  })
}

export function getBpmDataList(query) { // 项目change事件获取  关联流程 列表
  return request({
    url: `/bpm/bpmDataList?projectId=${query}&type=match`,
    method: 'get',
    // data: query
  })
}

// 项目名称列表查询
export function getProjectList(query) {
  return request({
    url: `/pigfarm-project/like?projectName=${query}`,
    method: 'get',
    // data: query
  })
}


// 列表页查询
export function delForm(query) {
  return request({
    url: `/contract-info/delete/${query}`,
    method: 'get',
    // data: query
  })
}

// 列表页查询
export function listForm(query) {
  return request({
    url: '/contract-info/list',
    method: 'post',
    data: query
  })
}

// 片区
export function getTreeselect() {
  return request({
    url: '/auth/dept/treeselect',
    method: 'get',
  })
}

export function updateFarmInfo(query) {
  return request({
    url: '/contract-info/update',
    method: 'post',
    data: query
  })
}


export function updateRetunFile(query) {
  return request({
    url: '/contract-info/updateRetunFile',
    method: 'post',
    data: query
  })
}

// 新增档案
export function addFarmInfo(query) {
  return request({
    url: '/contract-info/add',
    method: 'post',
    data: query
  })
}
// 查看详情
export function getDetailsById(query) {
  return request({
    url: `/contract-info/getById/${query}`,
    method: 'get',
    // data: query
  })
}
